import { messages } from "share/common";
import React, { Component } from "react";
import { AdvancedTable } from "components/index";
import httpFetch from "share/httpFetch";
import DataHoc from "../template/data-hoc";

@DataHoc
class ExpenseReviewRecoil extends Component {
  service = (page, size, searchParams) => {
    return httpFetch.post(
      `/api/bill/recoil/history?page=${page}&size=${size}`,
      Object.assign(
        {
          page,
          size,
          entityType: 1002,
          corporateFlag: true,
        },
        searchParams
      )
    );
  };

  render() {
    const { getColumns, getSearchForm } = this.props;
    return (
      <AdvancedTable
        index
        tableName={"expense-review-recoil"}
        title={messages("expense-14.key579") /*【对公支付单】已反冲*/}
        service={this.service}
        columns={getColumns("recoil", 1002)}
        searchForm={getSearchForm("recoil", 3004)}
        pinnedList={["formOIDs", "businessCode", "recoil", "userOID"]}
      />
    );
  }
}

export default ExpenseReviewRecoil;
